package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.pay.PayDivideBO;
import com.ymk.service.IPayDivideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 分账表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-06-01
 */
@Service
public class PayDivideService implements IPayDivideService {

    @Override
    public PayDivideBO get(Map param) {
    return this.daoRouter.queryForObject("PayDivide.loadPayDivide",param);
    }

    @Override
    public List<PayDivideBO> list(Map param) {
        return this.daoRouter.query("PayDivide.loadPayDivide",param);
    }

    @Override
    public List<PayDivideBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("PayDivide.loadPayDivideForPage",pagination);
    }

    @Override
    public void post(PayDivideBO param) {
        this.daoRouter.insert("APayDivide.insertPayDivide",param);
    }

    @Override
    public void postList(List<PayDivideBO> param) {
        this.daoRouter.insert("APayDivide.insertPayDivideList",param);
    }

    @Override
    public void update(PayDivideBO param) {
        this.daoRouter.update("APayDivide.updatePayDivide",param);
    }

    @Override
    public void del(PayDivideBO param) {
        this.daoRouter.update("APayDivide.delPayDivide",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
